package com.ruoyi.market.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.entity.SysUser;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 
 * @TableName market_order
 */
@TableName(value ="market_order")
@Data
public class Order2 extends BaseEntity implements Serializable {
    /**
     * 订单编号=DJ + 当前时间毫秒数
     */
    @TableId
    private String orderIndent;

    /**
     * 客户id（外键客户表）
     */
    private Integer mkCustomerId;
    @TableField(exist = false)
    private Customer customer;

    /**
     * 订购时间
     */
    private Date orderTime;

    /**
     * 总金额
     */
    private Double orderMoney;

    /**
     * 操作人id(user 外键)
     */
    private Integer sysOperUserId;
    @TableField(exist = false)
    private SysUser sysOperUser;

    /**
     * 审核状态(0/1/2/3)未审核/审核中/审核通过/审核不通过
     */
    private String chkStatus;

    /**
     * 审核id(user 外键)
     */
    private Integer sysChkUserId;
    @TableField(exist = false)
    private SysUser sysChkUser;

    /**
     * 审核时间
     */
    private Date checkTime;

    /**
     * 审核意见
     */
    private String opinion;

    /**
     * 仓库id(Warehouse 外键)
     */
    private Integer repoWareId;

    /**
     * 0(出库)1(未出库)
     */
    private String ckStatus;
    /**
     * 客户姓名
     */
    private String customerName;

    /**
     * 封装子表参数对象集合
     */
    private List<PoProduct2> poProduct2List;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;



    public List<PoProduct2> getPoProduct2List() {
        return poProduct2List;
    }

    public void setPoProduct2List(List<PoProduct2> poProduct2List) {
        this.poProduct2List = poProduct2List;
    }

    public Order2(){}

    public Order2(String orderIndent, Integer mkCustomerId, Customer customer, Date orderTime, Double orderMoney, Integer sysOperUserId, SysUser sysOperUser, String chkStatus, Integer sysChkUserId, SysUser sysChkUser, Date checkTime, String opinion, Integer repoWareId, String ckStatus, String customerName) {
        this.orderIndent = orderIndent;
        this.mkCustomerId = mkCustomerId;
        this.customer = customer;
        this.orderTime = orderTime;
        this.orderMoney = orderMoney;
        this.sysOperUserId = sysOperUserId;
        this.sysOperUser = sysOperUser;
        this.chkStatus = chkStatus;
        this.sysChkUserId = sysChkUserId;
        this.sysChkUser = sysChkUser;
        this.checkTime = checkTime;
        this.opinion = opinion;
        this.repoWareId = repoWareId;
        this.ckStatus = ckStatus;
        this.customerName = customerName;
    }

    @Override
    public String toString() {
        return "Order2{" +
                "orderIndent='" + orderIndent + '\'' +
                ", mkCustomerId=" + mkCustomerId +
                ", customer=" + customer +
                ", orderTime=" + orderTime +
                ", orderMoney=" + orderMoney +
                ", sysOperUserId=" + sysOperUserId +
                ", sysOperUser=" + sysOperUser +
                ", chkStatus='" + chkStatus + '\'' +
                ", sysChkUserId=" + sysChkUserId +
                ", sysChkUser=" + sysChkUser +
                ", checkTime=" + checkTime +
                ", opinion='" + opinion + '\'' +
                ", repoWareId=" + repoWareId +
                ", ckStatus='" + ckStatus + '\'' +
                ", customerName='" + customerName + '\'' +
                '}';
    }
}